;; set up org publishing following: 
;; http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php
;;
(require 'org-publish)
;; See this link for an explanation of the form of the alist
;; http://www.gnu.org/software/emacs/manual/html_node/org/Project-alist.html#Project-alist

(setq org-publish-project-alist
      '(

	;; ... add all the components here (see below)...

;; The top-level directory is called "OrgProjects".  Within this directory, you
;; can define one project consisting of multiple .org files within it.
;; I created it when I followed the org-publish-html-tutorial.  Since I want to
;; keep projects in separate subdirectories, follow the directions for
;; establishing projects in the next comment section.

;;There are probably better and cleaner ways to do this - I lack time to clean this up. I created one directory called org-init within the OrgProject directory.  This directory contains subdirectories called css and img.  I am using a technique that allows me to inherit css files from this directory for my other Projects when I include a project called "Project-inherit".  When I use this technique I can avoid creating separate css files for each project.  I can just use the css files in the org-init directory.

	("org-notes"
	 :base-directory "~/org-init/"
	 :base-extension "org"
	 :publishing-directory "~/public_html/"
	 :recursive t
	 :publishing-function org-publish-org-to-html
	 :headline-levels 4	  ; Just the default for this project.
	 :auto-preamble t
	)

	("org-static"
	 :base-directory "~/org-init/"
	 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
	 :publishing-directory "~/public_html/"
	 :recursive t
	 :publishing-function org-publish-attachment
	 )
	("org" :components ("org-notes" "org-static"))

;; Create subdirectories in the ~OrgProjects directory to hold org projects.  
;; I've included a template alist element named (capital) "B".  Simply
;; replace B with your actual project name to create a new project.

;; Begin Template - copy this structure to create a new project

	("B-inherit"
	 :base-directory "~/OrgProjects/org-init"
	 :recursive t
	 :base-extension "css\\|js"
	 :publishing-directory "~/public_html/B/"
	 :publishing-function org-publish-attachment
	 )

	("B-notes"
	 :base-directory "~/OrgProjects/B/"
	 :auto-index t
	 :index-filename "sitemap.org"
	 :index-title "Sitemap"
	 :recursive t
	 :base-extension "org"
	 :publishing-directory "~/public_html/B/"
	 :publishing-function org-publish-org-to-html
	 :headline-levels 4
	 :auto-preamble t
	 )
	("B-static"
	 :base-directory "~/OrgProjects/B/"
	 :recursive t
	 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
	 :publishing-directory "~/public_html/B/"
	 :publishing-function org-publish-attachment
        )

	("B" :components ("B-inherit" "B-notes" "B-static"))

;; End Template - copy this structure to create a new project


;; Personal Project		       
	("Personal-inherit"
	 :base-directory "~/OrgProjects/org-init/"
	 :recursive t
	 :base-extension "css\\|js"
	 :publishing-directory "~/public_html/Personal/"
	 :publishing-function org-publish-attachment
	 )

	("Personal-notes"
	 :base-directory "~/OrgProjects/Personal/"
	 :auto-index t
	 :index-filename "sitemap.org"
	 :index-title "Sitemap"
	 :recursive t
	 :base-extension "org"
	 :publishing-directory "~/public_html/Personal/"
	 :publishing-function org-publish-org-to-html
	 :headline-levels 4
	 :auto-preamble t
	 )

	("Personal-static"
	 :base-directory "~/OrgProjects/Personal/"
	 :recursive t
	 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
	 :publishing-directory "~/public_html/Personal/"
	 :publishing-function org-publish-attachment
        )

	("Personal" :components ("Personal-inherit" "Personal-notes" "Personal-static"))

;; Epistle
       
	("Epistle-inherit"
	 :base-directory "~/OrgProjects/org-init/"
	 :recursive t
	 :base-extension "css\\|js"
	 :publishing-directory "~/public_html/Epistle/"
	 :publishing-function org-publish-attachment
	 )

	("Epistle-notes"
	 :base-directory "~/OrgProjects/Epistle/"
	 :auto-index t
	 :index-filename "sitemap.org"
	 :index-title "Sitemap"
	 :recursive t
	 :base-extension "org"
	 :publishing-directory "~/public_html/Epistle/"
	 :publishing-function org-publish-org-to-html
	 :headline-levels 4
	 :auto-preamble t
	 )

	("Epistle-static"
	 :base-directory "~/OrgProjects/Epistle/"
	 :recursive t
	 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
	 :publishing-directory "~/public_html/Epistle/"
	 :publishing-function org-publish-attachment
        )

	("Epistle" :components ("Epistle-inherit" "Epistle-notes" "Epistle-static"))

;; Pandorabots

        ("Pandorabots-inherit"
	 :base-directory "~/OrgProjects/org-init/"
	 :recursive t
	 :base-extension "css\\|js"
	 :publishing-directory "~/public_html/Pandorabots/"
	 :publishing-function org-publish-attachment
	 )

	("Pandorabots-notes"
	 :base-directory "~/OrgProjects/Pandorabots/"
	 :auto-index t
	 :index-filename "sitemap.org"
	 :index-title "Sitemap"
	 :recursive t
	 :base-extension "org"
	 :publishing-directory "~/public_html/Pandorabots/"
	 :publishing-function org-publish-org-to-html
	 :headline-levels 4
	 :auto-preamble t
	 )
	("Pandorabots-static"
	 :base-directory "~/OrgProjects/Pandorabots/"
	 :recursive t
	 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
	 :publishing-directory "~/public_html/Pandorabots/"
	 :publishing-function org-publish-attachment
        )

	("Pandorabots" :components ("Pandorabots-inherit" "Pandorabots-notes" "Pandorabots-static"))

;; Symnosis

        ("Symnosis-inherit"
	 :base-directory "~/OrgProjects/org-init/"
	 :recursive t
	 :base-extension "css\\|js"
	 :publishing-directory "~/public_html/Symnosis/"
	 :publishing-function org-publish-attachment
	 )

	("Symnosis-notes"
	 :base-directory "~/OrgProejcts/Symnosis/"
	 :auto-index t
	 :index-filename "sitemap.org"
	 :index-title "Sitemap"
	 :recursive t
	 :base-extension "org"
	 :publishing-directory "~/public_html/Symnosis/"
	 :publishing-function org-publish-org-to-html
	 :headline-levels 4
	 :auto-preamble t
	 )
	("Symnosis-static"
	 :base-directory "~/OrgProjects/Symnosis/"
	 :recursive t
	 :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
	 :publishing-directory "~/public_html/Symnosis/"
	 :publishing-function org-publish-attachment
        )

	("Symnosis" :components ("Symnosis-inherit" "Symnosis-notes" "Symnosis-static"))    
   
	))
